import request from '@/utils/request'

// 查询用户列表
export function listUser_m(query) {
  return request({
    url: '/vehicle/user_m/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getUser_m(id) {
  return request({
    url: '/vehicle/user_m/' + id,
    method: 'get'
  })
}

// 新增用户
export function addUser_m(data) {
  return request({
    url: '/vehicle/user_m',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser_m(data) {
  return request({
    url: '/vehicle/user_m',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delUser_m(id) {
  return request({
    url: '/vehicle/user_m/' + id,
    method: 'delete'
  })
}

// 更新用户头像（保存MinIO返回的URL到数据库）
export function updateCarUserAvatar(data) {
  return request({
    url: '/vehicle/user_m/updateAvatar',
    method: 'put',
    data: data
  })
}
